import sys
import numpy as np
from ReMEAF import findEA
input_f=open('input','rt')
input_lines=input_f.readlines()
rrun="mpirun -f ../host.txt -n "+sys.argv[1]+" "+input_lines[0][:-1]+" | tee sout"
x0=[float(input_lines[1]),float(input_lines[2])]
x_lb=[float(input_lines[3]),float(input_lines[4])]
x_ub=[float(input_lines[5]),float(input_lines[6])]
T0=float(input_lines[7])
alfa=float(input_lines[8])
L=int(input_lines[9])
maxgen=int(input_lines[10])
ea=findEA(rrun,x0,x_lb,x_ub,T0,alfa,L,maxgen)
ea.run()